home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / Peon / PeonSDK-Win32-1.0.0.exe / {app} / PeonMain / include / Peonstdafx.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-11-25  |  6.9 KB  |  262 lines

  1.  
  2. #ifndef __PEONSTDAFX_H_
  3. #define __PEONSTDAFX_H_
  4. /*
  5. Peon - Win32 Games Programming Library
  6. Copyright (C) 2002-2005 Erik Yuzwa
  7.  
  8. This library is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU Library General Public
  10. License as published by the Free Software Foundation; either
  11. version 2 of the License, or (at your option) any later version.
  12.  
  13. This library is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16. Library General Public License for more details.
  17.  
  18. You should have received a copy of the GNU Library General Public
  19. License along with this library; if not, write to the Free
  20. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  21.  
  22. Erik Yuzwa
  23. peon AT wazooinc DOT com
  24. */
  25.  
  26. #include "PeonDLLHeader.h"
  27.  
  28.  
  29. #if defined( __WIN32__ ) || defined( _WIN32 )
  30. //enable some memory leak detection
  31. #if defined(DEBUG) | defined(_DEBUG)
  32. #define CRTDBG_MAP_ALLOC
  33. #include <stdlib.h>
  34. #include <crtdbg.h>
  35. #endif
  36.  
  37. #endif
  38.  
  39. /***************************************************************
  40. * These headers define our OpenGL subsystem and helper functions
  41. ***************************************************************/
  42. #include <SDL.h>
  43. #include <SDL_opengl.h>
  44. #include "GL/glext.h"
  45.  
  46.  
  47. /***************************************************************
  48. * These headers define our lua subsystem and helper functions
  49. ***************************************************************/
  50. extern "C"
  51. {
  52.   #include "lua/lua.h"
  53.   #include "lua/lualib.h"
  54.   #include "lua/lauxlib.h"
  55. }
  56.  
  57. /***************************************************************
  58. * These headers define our tokamak physics library
  59. ***************************************************************/
  60. #include "tokamak/tokamak.h"
  61.  
  62. /***************************************************************
  63. * These headers define our Audio subsystem and helper functions
  64. ***************************************************************/
  65.  
  66. //SDL_Mixer 
  67. #include <SDL_mixer.h>
  68.  
  69. //OpenAL
  70. #include "al/al.h"
  71. #include "al/alc.h"
  72. #include "al/alut.h"
  73.  
  74. //Ogg-Vorbis SDK which is used to read audio files in OGG format
  75. #include "ogg/ogg.h"
  76. #include "vorbis/codec.h"
  77. #include "vorbis/vorbisenc.h"
  78. #include "vorbis/vorbisfile.h"
  79.  
  80.  
  81. /***************************************************************
  82. * These headers define our CEGUI subsystem and helper functions
  83. ***************************************************************/
  84. #include "CEGUI/CEGUI.h"
  85. #include "CEGUI/renderers/OpenGLGUIRenderer/openglrenderer.h"
  86.  
  87.  
  88.  
  89. /***************************************************************
  90. * Various warnings that we need to disable
  91. ***************************************************************/
  92. // Turn off warnings generated by long std templates
  93. // This warns about truncation to 255 characters in debug/browse info
  94. #   pragma warning (disable : 4786)
  95.  
  96. // Turn off warnings generated by long std templates
  97. // This warns about truncation to 255 characters in debug/browse info
  98. #   pragma warning (disable : 4503)
  99.  
  100. // disable: "conversion from 'double' to 'float', possible loss of data
  101. #   pragma warning (disable : 4244)
  102.  
  103. // disable: "truncation from 'double' to 'float'
  104. #   pragma warning (disable : 4305)
  105.  
  106. // disable: "<type> needs to have dll-interface to be used by clients'
  107. // Happens on STL member variables which are not public therefore is ok
  108. #   pragma warning (disable : 4251)
  109.  
  110. // disable: "non dll-interface class used as base for dll-interface class"
  111. // Happens when deriving from Singleton because bug in compiler ignores
  112. // template export
  113. #   pragma warning (disable : 4275)
  114.  
  115. // disable: "C++ Exception Specification ignored"
  116. // This is because MSVC 6 did not implement all the C++ exception
  117. // specifications in the ANSI C++ draft.
  118. #   pragma warning( disable : 4290 )
  119.  
  120. // disable: "no suitable definition provided for explicit template
  121. // instantiation request" Occurs in VC7 for no justifiable reason on all
  122. // #includes of Singleton
  123. #   pragma warning( disable: 4661)
  124.  
  125. // disable: deprecation warnings when using CRT calls in VC8
  126. // These show up on all C runtime lib code in VC8, disable since they clutter
  127. // the warnings with things we may not be able to do anything about (e.g.
  128. // generated code from nvparse etc). I doubt very much that these calls
  129. // will ever be actually removed from VC anyway, it would break too much code.
  130. #    pragma warning( disable: 4996)
  131.  
  132. #include <cassert>
  133. #include <cstdio>
  134. #include <cstdlib>
  135. #include <ctime>
  136. #include <cstring>
  137. #include <cstdarg>
  138. #include <cmath>
  139.  
  140. // STL containers
  141. #include <vector>
  142. #include <map>
  143. #include <string>
  144. #include <set>
  145. #include <list>
  146. #include <deque>
  147. #include <queue>
  148.  
  149.  
  150. // STL algorithms & functions
  151. #include <algorithm>
  152. #include <functional>
  153. #include <limits>
  154.  
  155. // C++ Stream stuff
  156. #include <fstream>
  157. #include <iostream>
  158. #include <iomanip>
  159. #include <sstream>
  160.  
  161.  
  162. #if defined( __WIN32__ ) || defined( _WIN32 )
  163.  
  164. #undef min
  165. #undef max
  166.  
  167. #endif
  168.  
  169.  
  170.  
  171. /**
  172. * These following blocks of preproccessor statements are used to 
  173. * wrap around statements for cleaning up either pointers or
  174. * arrays of allocated elements.
  175. */
  176. #define PEON_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
  177. #define PEON_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
  178.  
  179.  
  180. /**
  181. * The following block of preprocessor statements give us a bit of a hand
  182. * when we want to do some radian to degree (or vice versa) conversions. Nothing
  183. * fancy here.
  184. */
  185. #define PEON_PI    3.141592654f
  186. #define PEON_DEGTORAD(degree) ((degree) * (PEON_PI / 180.0f))
  187. #define PEON_RADTODEG(radian) ((radian) * (180.0f / PEON_PI))
  188.  
  189.  
  190. namespace peon
  191. {
  192.  
  193.  
  194. /**
  195. * The following block of preprocessor statements try to create a common interface
  196. * for using the std::string object. If we are targeting a UNICODE build, then 
  197. * this will substitute all the std::string objects with std::wstring. 
  198. */
  199. #if defined( PEON_UNICODE )
  200.     typedef std::wstring _StringBase;
  201.     typedef const wchar_t* _StringPtrBase;
  202. #else
  203.     typedef std::string _StringBase;
  204.     typedef const char* _StringPtrBase;
  205. #endif
  206.  
  207.     typedef _StringBase String;
  208.     typedef _StringPtrBase StringPtr;
  209.  
  210.  
  211.     class Angle;
  212.     class AudioEngine;
  213.     class AxisAlignedBox;
  214.     class Billboard;
  215.     class Degree;
  216.     class EngineCore;
  217.     class FileLogger;
  218.     class IActor;
  219.     class IApplication;
  220.     class IniConfigReader;
  221.     class ISceneObject;
  222.     class IUnknown;
  223.     class Matrix33;
  224.     class Matrix44;
  225.     class MathUnit;
  226.     class Plane;
  227.     class PlaneBoundedVolume;
  228.     class Radian;
  229.     class Ray;
  230.     class SceneCamera;
  231.     class SceneFont;
  232.     class SceneLight;
  233.     class SceneOBJ;
  234.     class SceneMD3;
  235.     class SceneRenderer;
  236.     class SceneTexture;
  237.     class Skybox;
  238.     class Sphere;
  239.     class ParticleEmitter;
  240.     class Quaternion;
  241.     class Shockwave;
  242.     class Timer;
  243.     class Vector2;
  244.     class Vector3;
  245.     class Vector4;
  246.  
  247.  
  248. }
  249.  
  250. #endif
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.